<template>
  <div class="contanier border_top">
    <div class="nav flex align-center">
      <div
        v-for="(item, index) in navList"
        :key="index"
        class="flex align-center"
        :class="nav_act == index ? 'active' : ''"
        v-on:mousemove="navhover(index)"
        @mouseleave="mouseLeave"
        @click="navclcik(index, item.path)"
      >{{ item.text }}</div>
      <span class="morex">[查看更多]</span>
    </div>
    <ul class="p-0 m-0">
      <li class="flex flex-column steam align-center">
        <b>煤业动力煤6000吨</b>
        <h3>山西美锦矿业投资管理有限公司</h3>
        <h4>
          含税坑口价：
          <i>330元/吨</i>
        </h4>
        <span>查看详情</span>
      </li>
      <li class="flex flex-column steam align-center">
        <b>煤业动力煤6000吨</b>
        <h3>山西美锦矿业投资管理有限公司</h3>
        <h4>
          含税坑口价：
          <i>330元/吨</i>
        </h4>
        <span>查看详情</span>
      </li>
      <li class="flex flex-column steam align-center">
        <b>煤业动力煤6000吨</b>
        <h3>山西美锦矿业投资管理有限公司</h3>
        <h4>
          含税坑口价：
          <i>330元/吨</i>
        </h4>
        <span>查看详情</span>
      </li>
      <li class="flex flex-column steam align-center">
        <b>煤业动力煤6000吨</b>
        <h3>山西美锦矿业投资管理有限公司</h3>
        <h4>
          含税坑口价：
          <i>330元/吨</i>
        </h4>
        <span>查看详情</span>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      navList: [
        {
          path: "/",
          text: "供求挂单",
        },
      ],
      nav_act: 0,
      hea_act: 0,
    };
  },
  methods: {
    mouseLeave() {
      this.nav_act = this.hea_act;
    },
    navclcik(index, path) {
      this.nav_act = index;
      this.hea_act = index;
      this.$router.push({
        //核心语句
        path: path,
      });
    },
    navhover(data) {
      this.nav_act = data;
    },
  },
};
</script>

<style lang="stylus" scoped>
.contanier {
  width: 588px;
  height: 352px;
  background: #FFFFFF;
  margin-top: 28px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
}

.nav {
  position: relative;
}

.nav>div {
  height: 40px;
  font-size: 16px;
  font-weight: 400;
  color: #BF242A;
  padding: 0 20px;
  cursor: pointer;
}

.nav>div.active {
  color: #ffffff;
  border-color: #ffffff;
  background: #EB424C;
  // border-image: -webkit-linear-gradient(to right, #00036B, #409EFF) 30 30;
  // border-image: -moz-linear-gradient(to right, #00036B, #409EFF) 30 30;
  // border-image: linear-gradient(to right, #00036B, #409EFF) 30 30;
}

.morex {
  display: inline-block;
  font-size: 14px;
  color: #666666;
  position: absolute;
  right: 12px;
  cursor: pointer;
}

.steam {
  width: 266px;
  height: 136px;
  background: #FFFFFF;
  border: 1px solid rgba(102, 102, 102, 0.3);
  float: left;
  list-style: none;
  margin-top: 12px;
  margin-left: 20px;

  b {
    font-weight: normal;
    color: #1A1A1A;
    font-size: 12px;
    margin-top: 5px;
  }

  h3 {
    font-size: 16px;
    color: #1A1A1A;
    font-weight: 600;
    margin-top: 12px;
  }

  h4 {
    font-size: 16px;
    color: #1A1A1A;
    font-weight: 400;
    margin-top: -5px;

    i {
      font-style: normal;
      color: #EB424C;
      font-size: 16px;
    }
  }

  span {
    display: block;
    width: 114px;
    line-height: 28px;
    border-radius: 14px;
    background: #EB424C;
    color: #FFFFFF;
    font-size: 14px;
    margin-top: -5px;
    text-align: center;
  }
}
</style>